/**
 * <p>
 * Created on 2006-4-17 13:48:26 <br>
 * Copyright (c) 2006, All rights reserved.
 * </p>
 * @author Widen
 */
package com.widen.prima.editor.finance.report;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

import com.widen.prima.Messages;

public class ReportSubjectBalanceInput
    implements IEditorInput
{
    private String editorName;

    public ReportSubjectBalanceInput()
    {
        super();
        this.editorName = Messages
            .getString("ReportSubjectBalanceInput.sub.balance.rpt"); //$NON-NLS-1$
        Assert.isNotNull(editorName);
    }

    public boolean equals(Object obj)
    {
        if (super.equals(obj))
            return true;
        if (!(obj instanceof ReportSubjectBalanceInput))
            return false;
        ReportSubjectBalanceInput other = (ReportSubjectBalanceInput) obj;
        return editorName.equals(other.editorName);
    }

    public boolean exists()
    {
        return false;
    }

    public Object getAdapter(Class adapter)
    {
        return null;
    }

    public ImageDescriptor getImageDescriptor()
    {
        return null;
    }

    public String getName()
    {
        return editorName;
    }

    public IPersistableElement getPersistable()
    {
        return null;
    }

    public String getToolTipText()
    {
        return editorName;
    }

    public int hashCode()
    {
        return editorName.hashCode();
    }

    public void setEditorName(String editorName)
    {
        this.editorName = editorName;
    }
}
